#ifndef __udpspd_ctl_h__
#define __udpspd_ctl_h__ 1

#define UCTL_CONF_CMD_ECHO   "echo"
#define UCTL_CONF_CMD_REQ   "req"
#define UCTL_CONF_CMD_REDIRECT   "redirect"
#define UCTL_CONF_CMD_DOWNLOAD   "download"
#define UCTL_CONF_CMD_UPLOAD   "upload"
#define UCTL_CONF_CMD_UPLOAD_FINISH   "finishUpload"
#define UCTL_CONF_CMD_UPLOAD_REPORT   "reportUpload"
#define UCTL_CONF_CMD_ACK   "ack"
#define UCTL_CONF_CMD_CLOSE   "close"

#define UDP_BUFFER_MAX 3000

typedef struct{
    char cmd[32];
    unsigned short port;
    long long rate;
    int blksize;
    int duration;
    long long bytes;
    long long packets;
}uctl_conf_t;

int uctl_conf_struct2str(uctl_conf_t* conf, char* buf, int len);
int uctl_conf_str2struct(uctl_conf_t* conf, char* buf, int len);

#endif